import request from '@/utils/request'

import { baseUrlConfig } from '@/config/config'
const basePath = baseUrlConfig.processBaseUrl

export interface PageListType {
  pageNum?: number
  pageSize?: number
  condition: {
    projectNo: string
    projectName:string
    projectCompany:string
    dailyConstructionNo:string
    terminalBuilding:string
    projectType:string
    errorDesc:string
    createTimeStart:string
    createTimeEnd:string
    errorType:number
  }
}

// 获取数量
export const getTotal = (data: any) => {
  return request({
      url: basePath + '/construction/error/find/counter',
      method: 'post',
      data
  })
}

// 获取分页列表
export const getPageList: (data: any) => Promise<[]> = (data) => {
  return request({
    url: basePath + '/construction/error/find/page',
    method: 'post',
    data
  })
}

//导出
export const exportList = (data: any) => {
  return request({
    responseType: 'blob',
    url: basePath + "/construction/error/export",
    method:'post',
    data:data
  })
}
